package com.cz.design.structure.adapter.clazz;

import com.cz.design.structure.adapter.Player;
import com.cz.design.structure.adapter.Zh_JPTranslator;

/**
 * 通过继承的方式：类结构模式
 */
public class JPMoviePlayerAdapter extends Zh_JPTranslator implements Player {

    private Player target; // 被适配对象

    public JPMoviePlayerAdapter(Player target) {
        this.target = target;
    }

    @Override
    public String play() {

        String play = target.play();
        System.out.println("日文：" + translator(play));
        return translator(play);

    }
}
